package com.nitty.cash.loop.ui.activity

import android.graphics.Color
import android.view.View
import com.nitty.cash.loop.R
import com.nitty.cash.loop.common.CommonActivity
import com.nitty.cash.loop.databinding.UiLimitRejectedBinding
import com.nitty.cash.loop.event.NittyEventPointType
import com.nitty.cash.loop.utils.helper.NittyProcessHelper

/**
 * NittyCash
 * @Author wwdeng
 * @CreateTime: 2024/12/16 13:41
 * @Annotation：额度审核被拒绝
 */
class LimitRejectedAct: CommonActivity() {
    lateinit var binding: UiLimitRejectedBinding

    override fun getNittyRootView(): View? {
        binding = UiLimitRejectedBinding.inflate(layoutInflater)
        return binding.root
    }

    override fun initNittyView() {
        setNittyTitleBarColor(Color.parseColor("#FFFFFFFF"))
        setNittyBackBtnRes(R.mipmap.img_back_black)
        setNittyRightBtnRes(R.mipmap.img_customer_black)
        setNittyTextTitleVisibility(View.GONE)
    }

    override fun initNittyListener() {
        rootViewBinding.rootCustomer.setOnClickListener {
            showCustomerDialog("Limit Rejected Page")
            addEventPointRequestAction(NittyEventPointType.CLICK.NITTY_CLICK_CUSTOMER,"Limit Rejected Page")
        }
    }

    override fun loadNittyData() {
        binding.textLimitRejectedApplyAgainDate.text = String.format(getString(R.string.order_status_rejected_desc),NittyProcessHelper.getAuthApplyAgainDate())
    }

    override fun onStart() {
        super.onStart()
        addEventPointRequestAction(NittyEventPointType.PAGE.NITTY_PAGE_CREDIT_REJECTED_START)
    }

    override fun onDestroy() {
        super.onDestroy()
        addEventPointRequestAction(NittyEventPointType.PAGE.NITTY_PAGE_CREDIT_REJECTED_END)
    }
}